package com.payment.ktb.activity.main4;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.android.volley.VolleyError;
import com.payment.ktb.Interface.HttpCallbackListener;
import com.payment.ktb.R;
import com.payment.ktb.activity.BaseActivity;
import com.payment.ktb.constants.ConstantsUser;
import com.payment.ktb.constants.HttpActions;
import com.payment.ktb.constants.HttpUrls;
import com.payment.ktb.utils.AlertDialogUtils;
import com.payment.ktb.utils.HttpUtils;
import com.payment.ktb.utils.LogUtil;
import com.payment.ktb.utils.SharedPreferencesUtils;
import com.squareup.picasso.Picasso;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by admin on 2017/9/6.
 */

public class AddSettleBankCardDetailActivity extends BaseActivity {


    @BindView(R.id.tv_addsettlebankcarddetail_username)
    TextView tv_addsettlebankcarddetail_username;
    @BindView(R.id.tv_addsettlebankcarddetail_cardno)
    TextView tv_addsettlebankcarddetail_cardno;
    @BindView(R.id.tv_addsettlebankcarddetail_bankname)
    TextView tv_addsettlebankcarddetail_bankname;
    @BindView(R.id.tv_addsettlebankcarddetail_branchbank)
    TextView tv_addsettlebankcarddetail_branchbank;
    @BindView(R.id.iv_addsettlebankcarddetail_card)
    ImageView iv_addsettlebankcarddetail_card;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_addsettlebankcarddetail);
        ButterKnife.bind(this);
        initTitle("结算卡详情");
        initData();
    }

    private void initData() {

        tv_addsettlebankcarddetail_username.setText(SharedPreferencesUtils.getString(ConstantsUser.userAccount));
        tv_addsettlebankcarddetail_cardno.setText(getIntent().getStringExtra("cardNo"));
        tv_addsettlebankcarddetail_bankname.setText(getIntent().getStringExtra("cardBank"));
        tv_addsettlebankcarddetail_branchbank.setText(getIntent().getStringExtra("cardCnaps"));
        Picasso.with(mContext).load(getIntent().getStringExtra("cardPic")).fit().into(iv_addsettlebankcarddetail_card);
    }


    @OnClick({R.id.btn_addsettlebankcarddetail_change})
    public void clickEvent(View view){

        switch (view.getId()) {

            case R.id.btn_addsettlebankcarddetail_change:
                Intent intent = new Intent(mContext,AddSettleBankcardActivity.class);
                intent.putExtra("httpActionType","UserSettleCardModifyState");
                startActivity(intent);
                break;

        }


    }

}
